
<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
        <div class="layui-form-item">
            <label class="layui-form-label required">商品名称</label>
            <div class="layui-input-block" >
                <input type="text" name="title" class="layui-input" placeholder="请输入商品名称" value="{$row.title|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">商品分类</label>
            <div class="layui-input-block">
                <select name="good_type_id">
                    <option value="">请选择</option>
                    {volist name="good_type" id="v"}
                    <option value="{$v.id}" {if condition="$row.good_type_id eq $v.id"}selected{/if}>{$v.title}</option>
                    {/volist}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">商品最低价</label>
            <div class="layui-input-block">
                <input type="number" name="bottom_price" class="layui-input" placeholder="请输入商品最低价" value="{$row.bottom_price|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">商品条码</label>
            <div class="layui-input-block">
                <input type="text" name="bar_code" class="layui-input" placeholder="请输入商品条码" value="{$row.bar_code|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">初始库存</label>
            <div class="layui-input-block">
                <input type="number" name="stock" class="layui-input" placeholder="请输入初始库存" value="{$row.stock|default=''}">
            </div>
        </div>
        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>
    </form>
</div>
<script type="text/javascript">
    layui.use(['form','upload'], function(){
        var form = layui.form;
        var upload = layui.upload;
        $ = layui.$;
        //各种基于事件的操作。
      

    });
</script>